package edu.langnan.xiaoli.service.impl;

import edu.langnan.xiaoli.core.dto.LeaveInfoDTO;
import edu.langnan.xiaoli.core.dto.LeaveParamDTO;
import edu.langnan.xiaoli.mapper.LeaveMapper;
import edu.langnan.xiaoli.service.LeaveService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author cql
 */
@Service
public class LeaveServiceImpl implements LeaveService {

    private static final Logger log = LoggerFactory.getLogger(LeaveService.class);

    @Autowired
    private LeaveMapper leaveMapper;

    @Override
    public void insertLeave(LeaveParamDTO param) {
        leaveMapper.insertLeave(param);
    }

    @Override
    public List<LeaveInfoDTO> leaveList(Integer stuId) {
        return leaveMapper.leaveList(stuId);
    }
}
